<!doctype html>
<html class="no-js fixed-layout" data-ng-app="audittest">
#include("/WEB-INF/tpl/head.vm")
<link rel="stylesheet" href="../assets/css/amazeui.tree.css" />
<div data-ng-controller="admin-testauth">
	<div class="am-cf am-padding">
		<div class="am-fl am-cf">
			<strong class="am-text-primary am-text-lg">首页</strong> /
			<small>阅卷人员授权设置</small>
		</div>
	</div>
	<div data-ng-show="!authopt">
		<div class="am-form">
			年度:
			<select data-ng-options="nd for nd in nds" data-am-selected="{btnSize: 'sm'}" data-ng-model="qnd"></select>
			&nbsp; 序列:
			<select data-ng-options="a.seqbh as a.seqname for a in seqs" data-am-selected="{btnSize: 'sm'}" data-ng-model="qseq"></select>
			&nbsp; 分类:
			<select data-ng-options="a.catebh as a.catename for a in cates" data-am-selected="{btnSize: 'sm'}" data-ng-model="qcate"></select>
			&nbsp;
			<button type="button" class="am-margin-right am-btn am-btn-search" data-ng-click="search()">检索</button>
		</div>
		<table class="am-table am-table-bd am-table-striped admin-content-table">
			<thead>
				<tr>
					<th>序号</th>
					<th>计划名称</th>
					<th>计划年度</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr data-ng-repeat="item in items">
					<td>{{$index + 1}}</td>
					<td>{{item.modelname}}</td>
					<td>{{item.year}}</td>
					<td>
						<button type="button" class="am-btn am-btn-primary" data-ng-click="edit(item)">授权</button>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div data-ng-show="authopt">
		<div style="float: right;">
			<button data-ng-click="authopt=false" class="am-btn am-btn-sm am-btn-primary am-active">返回</button>
		</div>
		<div class="am-g">
			<div class="am-u-sm-3">
				<div>
					<div class="am-margin-right am-form">
						<input type="text" data-ng-model="userfilter" placeholder="输入名称查找" />
					</div>
				</div>
				<ul class="am-tree" id="firstTree">
					<li class="am-tree-branch am-hide" data-template="treebranch">
						<div class="am-tree-branch-header">
							<button class="am-tree-branch-name">
								<span class="am-tree-icon am-tree-icon-folder"></span>
								<span class="am-tree-label"></span>
							</button>
						</div>
						<ul class="am-tree-branch-children"></ul>
						<div class="am-tree-loader">
							<span class="am-icon-spin am-icon-spinner"></span>
						</div>
					</li>
					<li class="am-tree-item am-hide" data-template="treeitem">
						<button class="am-tree-item-name">
							<span class="am-tree-icon am-tree-icon-item"></span>
							<span class="am-tree-label"></span>
						</button>
					</li>
				</ul>
			</div>

			<div class=" am-u-sm-6">
				<button type="button" class="am-btn am-btn-primary" data-ng-click="addperson()">添加</button>
				<div class="am-scrollable-horizontal">
					<table class="am-table am-table-bd am-text-nowrap am-table-striped admin-content-table">
						<thead>
							<tr>
								<th>
									<input type="checkbox" data-ng-click="checkAll()" data-ng-model="checkall" />
								</th>
								<th>序号</th>
								<th>登录名</th>
								<th>姓名</th>
								<th>机构</th>
							</tr>
						</thead>
						<tbody>
							<tr data-ng-repeat="item in persons | filter:userfilter track by $index">
								<td>
									<input type="checkbox" data-ng-model="item.checked" />
								</td>
								<td>{{$index + 1}}</td>
								<td>{{item.username}}</td>
								<td>{{item.realname}}</td>
								<td>{{orgPathMaps[item.userdep]}}</td>
							</tr>
						</tbody>
					</table>
				</div>
				<button type="button" class="am-btn am-btn-primary" data-ng-click="addperson()">添加</button>
			</div>
			<div class="am-u-sm-3">
				<div class="am-scrollable-horizontal">
					<table class="am-table am-table-bd am-text-nowrap am-table-striped admin-content-table">
						<thead>
							<tr>
								<th></th>
								<th>序号</th>
								<th>登录名</th>
								<th>姓名</th>
							</tr>
						</thead>
						<tbody>
							<tr data-ng-repeat="item in currentAuths | filter:userfilter track by $index">
								<td>
									<input type="checkbox" data-ng-model="item.checked" />
								</td>
								<td>{{$index + 1}}</td>
								<td>{{item.username}}</td>
								<td>{{item.realname}}</td>
							</tr>
						</tbody>
					</table>
				</div>
				<button type="button" class="am-btn am-btn-danger" data-ng-click="deleteperson()">删除</button>
				<div>&nbsp;</div>
				<hr />
				<div class="au-u-sm-12">
					<button type="button" class="am-btn am-btn-primary" data-ng-click="postData()">保存</button>
					&nbsp;
					<button type="button" class="am-btn am-btn-cancel" data-ng-click="cancel()">取消</button>
				</div>
			</div>
		</div>
	</div>
</div>
#include("/WEB-INF/tpl/footer.vm")
<script src="../assets/js/amazeui.tree.js"></script>

</html>